<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:mvc="http://www.springframework.org/schema/mvc"
    xmlns:tx="http://www.springframework.org/schema/tx"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
                        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
                        http://www.springframework.org/schema/context
                        http://www.springframework.org/schema/context/spring-context-3.0.xsd
                        http://www.springframework.org/schema/tx
                        http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
                        http://www.springframework.org/schema/mvc
                        http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd">



      <bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping"/>

      <bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter"/>

     <!--  <bean class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver">
          <property name="order" value="1"/>
           <property name="mediaTypes">
             <map>
                <entry key="xml" value="application/xml" />
                <entry key="json" value="application/json" />
                <entry key="atom" value="application/atom+xml" />
                <entry key="rss" value="application/rss+xml" />
            </map>
        </property>
        <property name="defaultContentType" value="application/json" />
        <property name="favorPathExtension" value="true" />


        <property name="viewResolvers">
            <list>
                <bean class="org.springframework.web.servlet.view.BeanNameViewResolver" />
            </list>
        </property>

        <property name="defaultViews">
            <list>
                <bean class="org.springframework.web.servlet.view.json.MappingJacksonJsonView">
                      <property name="prefixJson" value="false"/>
                      <property name="disableCaching" value="true"></property>
                </bean>
                <ref bean="tweetPollAtomFeedView"/>
                <ref bean="tweetPollRssFeedView"/>
             </list>
        </property>
        <property name="ignoreAcceptHeader" value="true" />
    </bean>
 -->
    <!--
    Maps requests to @Controllers based on @RequestMapping("path")
    annotation values If no annotation-based path mapping is found, Spring
    MVC proceeds to the next HandlerMapping (order=0 below).
  -->
  <bean
    class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping"><!--
      <property name="interceptors"> <list>
        <ref bean="openSessionInViewInterceptor"/> </list>
      </property>
  -->

  </bean>

  <!-- Scans for application @Components to deploy -->
  <context:component-scan base-package="org.encuestame.mvc" />

  <!--
    Enables annotated @Controllers; responsible for invoking an annotated
    POJO @Controller when one is mapped.
  -->
  <bean
    class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter">
  </bean>

</beans>
